//1.引入i18n的api
import { createI18n } from "vue-i18n";
//2.引入配置好的中英文
import localZhCn from './languages/zh-cn'
import localEn from './languages/en'

//引入element plus 的中英文
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import en from "element-plus/dist/locale/en.mjs";

//3.初始化i18n的配置
const i18n = createI18n({
    legacy:false,
    locale: 'zh-cn',
    fallbackLocale: 'zh-cn',
    messages:{
        'zh-cn': localZhCn,
        'en': localEn
    }
})
//4.对外抛出 i18n
export default i18n


export const elementLocales = {
    'zh-cn': zhCn,
    'en': en,
}